//
//  CLLocation+Utility.m
//  RobNewGrain
//
//  Created by 唐可雄 on 16/8/5.
//  Copyright © 2016年 swustyc. All rights reserved.
//

#import "CLLocation+Utility.h"

@implementation CLLocation (Utility)

- (CLLocation *)getLocationWithdistance:(float)distance angle:(float)angle {
    return [[CLLocation alloc] initWithLatitude:self.coordinate.latitude + (distance * cos(angle * M_PI / 180)) / 111 longitude:self.coordinate.longitude + (distance * sin(angle * M_PI / 180)) / (111 * cos(self.coordinate.latitude * M_PI / 180))];
}

@end
